<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('Warframe指令配置')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">


<div class="container-div">
    <div class="row">
        <div class="container-div">
            <div class="row">
                <div class="col-sm-12 select-table table-striped">
                    <table id="bootstrap-table"></table>
                </div>
            </div>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: bootstrap-select-js"/>
<script th:inline="javascript">
    var prefix = ctx + "warframe/config"
    $(function() {
        var options = {
            url: prefix + "/list",
            createUrl: prefix + "/add/{id}",
            updateUrl: prefix + "/edit/{id}",
            removeUrl: prefix + "/remove/{id}",
            modalName: "Warframe指令",
            sortOrder: "desc",
            escape: true,
            showPageGo: true,
            rememberSelected: true,
            columns: [
                {
                    field: 'key',
                    title: 'Key'
                },
                {
                    field: 'value',
                    title: 'Value'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        if (row.uid !== 0) {
                            var actions = [];
                            actions.push('<a class="btn btn-success btn-xs " href="javascript:void(0)" onclick="$.operate.editStr(\''+row.key+'\')"><i class="fa fa-edit"></i>修改</a> ');
                            return actions.join('');
                        }
                    }
                }]
        };
        $.table.init(options);
    });


</script>


</body>
</html>